
**********************************************************************************
*** Spatial Inequalities in Premature Mortality in Great Britain 
*** Authors in alphabetical order: Denise Laroze, Eric Neumayer, Thomas Pluemper.
*** STATA 12 
*** Replication data and additional non-reported results
********************************************************************************** 



***********************************************************************************
local DIR = "D:\Research\Health for all database\WHO mortality database\"
  /*change relative path to the directory where the files are located */
cd "`DIR'"
***********************************************************************************




use "ipmgb.dta", replace

set more off



***********************************
******** Descriptive variable statistics
***********************************



********************
******** a.	Variables employed in spatial pattern recognition
********************

quietly reg pm0_70_m    northerness westerness, robust
sum northerness westerness centrality pm070_m_splag_cont_rwst pm070_f_splag_cont_rwst pm070_m_splag_prox_rwst pm070_m_splag_prox_rwst area_density if e(sample)


********************
******** b.	Variables employed in regressing premature mortality on its socioeconomic determinants 
********************


quietly reg pm0_70_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white,  


sum	pm0_70_m pm0_70_f mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white if e(sample),  



	 
	 
***********************************
******** Excluding outliers
***********************************
	 
	
use "ipmgb.dta", replace

 

***********************************
******** Detecting Spatial Patterns
***********************************



********************
******** Table 1
********************

capture dropvars westerness
gen westerness=-easterness



** Great Britain

* Outliers for male premature mortality
fit pm0_70_m    northerness westerness
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Male 
reg pm0_70_m    northerness westerness, robust
outreg2 using table1, excel 2aster  replace  dec(4)  label ctitle(PM Male) 
reg pm0_70_m    northerness westerness if excl_m!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Outliers for female premature mortality
fit pm0_70_f    northerness westerness
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1

* Female 
reg pm0_70_f    northerness westerness, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 
reg pm0_70_f    northerness westerness if excl_f!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain

* Outliers for male premature mortality
fit pm0_70_m    centrality
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Male 
reg pm0_70_m    centrality, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 
reg pm0_70_m    centrality if excl_m!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 


* Outliers for female premature mortality
fit pm0_70_f    centrality
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1

* Female 
reg pm0_70_f    centrality, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 
reg pm0_70_f    centrality if excl_f!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 



** Great Britain

* Outliers for male premature mortality
fit pm0_70_m    pm070_m_splag_cont_rwst
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Male 
reg pm0_70_m     pm070_m_splag_cont_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 
reg pm0_70_m    pm070_m_splag_cont_rwst if excl_m!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 


* Outliers for female premature mortality
fit pm0_70_f    centrality
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1

* Female 
reg pm0_70_f     pm070_f_splag_cont_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 
reg pm0_70_f    pm070_f_splag_cont_rwst if excl_f!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain

* Outliers for male premature mortality
fit pm0_70_m    pm070_m_splag_cont_rwst
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Male 
reg pm0_70_m     pm070_m_splag_prox_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 
reg pm0_70_m    pm070_m_splag_prox_rwst if excl_m!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Outliers for female premature mortality
fit pm0_70_f    centrality
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1


* Female 
reg pm0_70_f     pm070_f_splag_prox_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 
reg pm0_70_f    pm070_f_splag_prox_rwst if excl_f!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain

* Outliers for male premature mortality
fit pm0_70_m    pm070_m_splag_cont_rwst
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Male 
reg pm0_70_m    area_density , robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 
reg pm0_70_m    area_density if excl_m!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Outliers for female premature mortality
fit pm0_70_f    centrality
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1

* Female 
reg pm0_70_f    area_density, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 
reg pm0_70_f    area_density if excl_f!=1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




***********************************
******** The Socio-Economic Determinants
***********************************



********************
******** Table 2
********************

preserve

* Express income as income in ī
replace mean_income_imp=mean_income_imp/1000

* Express premature mortality as probability
replace pm0_70_m=pm0_70_m/100000

* Express premature mortality as probability
replace pm0_70_f=pm0_70_f/100000

* Descriptive summary stats of premature mortality
su pm0_70_m
su pm0_70_f

*** Male
reg pm0_70_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white,  
outreg2 using table2, excel noaster replace   dec(4)  label ctitle(PM Male)


*** Female
reg pm0_70_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health,  
outreg2 using table2, excel noaster append  dec(4)  label ctitle(PM Female)

restore




***********************************
******** Explaining the Spatial Patterns
***********************************



*** Male
quietly reg pm0_70_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white, robust 
predict resi_reg1_m, resid
predict y_star0_70_m // used for the maps
predict resid0_70_m, resid // used for the maps


*** Female
quietly reg pm0_70_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health, robust 
predict resi_reg1_f, resid
predict y_star0_70_f // used for the maps
predict resid0_70_f, resid // used for the maps



********************
******** table 4
********************

capture dropvars westerness
gen westerness=-easterness


** Great Britain

* Outliers for male premature mortality
fit pm0_70_m    northerness westerness
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Outliers for female premature mortality
fit pm0_70_f    northerness westerness
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1


* Male 
reg pm0_70_m    northerness westerness if excl_m!=1, robust
outreg2 using table4, excel 2aster  replace  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    northerness westerness if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Male 
reg resi_reg1_m    northerness westerness if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f    northerness westerness if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Great Britain

* Outliers for male premature mortality
fit pm0_70_m    centrality
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Outliers for female premature mortality
fit pm0_70_f    centrality
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1



* Male 
reg pm0_70_m    centrality if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    centrality if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Male 
reg resi_reg1_m    centrality if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f   centrality if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain


* Outliers for male premature mortality
fit pm0_70_m    pm070_m_splag_cont_rwst
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Outliers for female premature mortality
fit pm0_70_f    pm070_f_splag_cont_rwst
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1



* Male 
reg pm0_70_m     pm070_m_splag_cont_rwst if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f     pm070_f_splag_cont_rwst if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm070_m_splag_cont_rwst if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f    pm070_f_splag_cont_rwst if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain


* Outliers for male premature mortality
fit pm0_70_m    pm070_m_splag_prox_rwst
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Outliers for female premature mortality
fit pm0_70_f    pm070_f_splag_prox_rwst
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1


* Male 
reg pm0_70_m     pm070_m_splag_prox_rwst if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f     pm070_f_splag_prox_rwst if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm070_m_splag_prox_rwst if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f    pm070_f_splag_prox_rwst if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain


* Outliers for male premature mortality
fit pm0_70_m    area_density
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_m
generate excl_m=0
replace excl_m=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_m==1

* Outliers for female premature mortality
fit pm0_70_f    area_density
capture dropvars dfits
fpredict dfits, dfits
capture dropvars excl_f
generate excl_f=0
replace excl_f=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list area dfits if dfits~=. & excl_f==1


* Male 
reg pm0_70_m    area_density  if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    area_density if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    area_density if excl_m!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f    area_density if excl_f!=1, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





***********************************
******** Results for lower age threshold of 60
***********************************

use "ipmgb.dta", replace


***********************************
******** Detecting Spatial Patterns
***********************************



********************
******** Table 1
********************


** Great Britain
* Male 
reg pm0_60_m    northerness westerness, robust
outreg2 using table1, excel 2aster  replace  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    northerness westerness, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_60_m    northerness westerness if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    northerness westerness if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_60_m    northerness westerness if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    northerness westerness if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 



** Great Britain
* Male 
reg pm0_60_m    centrality, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f    centrality, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_60_m    centrality if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    centrality if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_60_m    centrality if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    centrality if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 



** Great Britain
* Male 
reg pm0_60_m     pm060_m_splag_cont_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f     pm060_f_splag_cont_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_60_m     pm060_m_splag_cont_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f     pm060_f_splag_cont_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_60_m     pm060_m_splag_cont_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f     pm060_f_splag_cont_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_60_m     pm060_m_splag_prox_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f     pm060_f_splag_prox_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_60_m     pm060_m_splag_prox_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4) label ctitle(PM Male) 

* Female 
reg pm0_60_f     pm060_f_splag_prox_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_60_m     pm060_m_splag_prox_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f     pm060_f_splag_prox_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_60_m    area_density , robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f    area_density, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_60_m    area_density if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    area_density if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_60_m    area_density if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    area_density if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




***********************************
******** The Socio-Economic Determinants
***********************************



********************
******** Table 2
********************

preserve

* Express income as income in ī
replace mean_income_imp=mean_income_imp/1000

* Express premature mortality as probability
replace pm0_60_m=pm0_60_m/100000

* Express premature mortality as probability
replace pm0_60_f=pm0_60_f/100000

* Descriptive summary stats of premature mortality
su pm0_60_m
su pm0_60_f

*** Male
reg pm0_60_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white,  
outreg2 using table2, excel noaster replace   dec(4)  label ctitle(PM Male)


*** Female
reg pm0_60_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health,  
outreg2 using table2, excel noaster append  dec(4)  label ctitle(PM Female)

restore




***********************************
******** Explaining the Spatial Patterns
***********************************



*** Male
quietly reg pm0_60_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white, robust 
predict resi_reg1_m, resid
predict y_star0_60_m // used for the maps
predict resid0_60_m, resid // used for the maps


*** Female
quietly reg pm0_60_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health, robust 
predict resi_reg1_f, resid
predict y_star0_60_f // used for the maps
predict resid0_60_f, resid // used for the maps



********************
******** table 4
********************



** Great Britain
* Male 
reg pm0_60_m    northerness westerness, robust
outreg2 using table4, excel 2aster  replace  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_60_f    northerness westerness, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Male 
reg resi_reg1_m    northerness westerness, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f    northerness westerness, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_60_m    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_60_m     pm060_m_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f     pm060_f_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm060_m_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    pm060_f_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain
* Male 
reg pm0_60_m     pm060_m_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f     pm060_f_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm060_m_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    pm060_f_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain
* Male 
reg pm0_60_m    area_density , robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_60_f    area_density, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    area_density, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    area_density, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





***********************************
******** Results for higher age threshold of 75
***********************************

use "ipmgb.dta", replace


***********************************
******** Detecting Spatial Patterns
***********************************



********************
******** Table 1
********************


** Great Britain
* Male 
reg pm0_75_m    northerness westerness, robust
outreg2 using table1, excel 2aster  replace  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    northerness westerness, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_75_m    northerness westerness if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    northerness westerness if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_75_m    northerness westerness if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    northerness westerness if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 



** Great Britain
* Male 
reg pm0_75_m    centrality, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f    centrality, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_75_m    centrality if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    centrality if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_75_m    centrality if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    centrality if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 



** Great Britain
* Male 
reg pm0_75_m     pm075_m_splag_cont_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f     pm075_f_splag_cont_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_75_m     pm075_m_splag_cont_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f     pm075_f_splag_cont_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_75_m     pm075_m_splag_cont_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f     pm075_f_splag_cont_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_75_m     pm075_m_splag_prox_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f     pm075_f_splag_prox_rwst, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_75_m     pm075_m_splag_prox_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4) label ctitle(PM Male) 

* Female 
reg pm0_75_f     pm075_f_splag_prox_rwst if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_75_m     pm075_m_splag_prox_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f     pm075_f_splag_prox_rwst if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_75_m    area_density , robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f    area_density, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_75_m    area_density if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    area_density if country==1, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_75_m    area_density if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    area_density if country==3, robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




***********************************
******** The Socio-Economic Determinants
***********************************



********************
******** Table 2
********************

preserve

* Express income as income in ī
replace mean_income_imp=mean_income_imp/1000

* Express premature mortality as probability
replace pm0_75_m=pm0_75_m/100000

* Express premature mortality as probability
replace pm0_75_f=pm0_75_f/100000

* Descriptive summary stats of premature mortality
su pm0_75_m
su pm0_75_f

*** Male
reg pm0_75_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white,  
outreg2 using table2, excel noaster replace   dec(4)  label ctitle(PM Male)


*** Female
reg pm0_75_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health,  
outreg2 using table2, excel noaster append  dec(4)  label ctitle(PM Female)

restore




***********************************
******** Explaining the Spatial Patterns
***********************************



*** Male
quietly reg pm0_75_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white, robust 
predict resi_reg1_m, resid
predict y_star0_75_m // used for the maps
predict resid0_75_m, resid // used for the maps


*** Female
quietly reg pm0_75_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health, robust 
predict resi_reg1_f, resid
predict y_star0_75_f // used for the maps
predict resid0_75_f, resid // used for the maps



********************
******** table 4
********************



** Great Britain
* Male 
reg pm0_75_m    northerness westerness, robust
outreg2 using table4, excel 2aster  replace  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_75_f    northerness westerness, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Male 
reg resi_reg1_m    northerness westerness, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f    northerness westerness, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_75_m    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    centrality, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_75_m     pm075_m_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f     pm075_f_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm075_m_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    pm075_f_splag_cont_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 






** Great Britain
* Male 
reg pm0_75_m     pm075_m_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f     pm075_f_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm075_m_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    pm075_f_splag_prox_rwst, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain
* Male 
reg pm0_75_m    area_density , robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_75_f    area_density, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    area_density, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    area_density, robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 







***********************************
******** Weighting observations by population
***********************************


use "ipmgb.dta", replace

set more off




***********************************
******** Detecting Spatial Patterns
***********************************



********************
******** Table 1
********************


** Great Britain
* Male 
reg pm0_70_m    northerness westerness [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  replace  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    northerness westerness [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_70_m    northerness westerness if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    northerness westerness if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_70_m    northerness westerness if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    northerness westerness if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 



** Great Britain
* Male 
reg pm0_70_m    centrality [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f    centrality [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_70_m    centrality if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    centrality if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_70_m    centrality if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    centrality if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 



** Great Britain
* Male 
reg pm0_70_m     pm070_m_splag_cont_rwst [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f     pm070_f_splag_cont_rwst [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_70_m     pm070_m_splag_cont_rwst if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f     pm070_f_splag_cont_rwst if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_70_m     pm070_m_splag_cont_rwst if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f     pm070_f_splag_cont_rwst if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_70_m     pm070_m_splag_prox_rwst [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f     pm070_f_splag_prox_rwst [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_70_m     pm070_m_splag_prox_rwst if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4) label ctitle(PM Male) 

* Female 
reg pm0_70_f     pm070_f_splag_prox_rwst if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_70_m     pm070_m_splag_prox_rwst if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f     pm070_f_splag_prox_rwst if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_70_m    area_density  [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f    area_density [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** England
* Male 
reg pm0_70_m    area_density if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    area_density if country==1 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 


** Scotland
* Male 
reg pm0_70_m    area_density if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    area_density if country==3 [aweight=area_n_usual_residents], robust
outreg2 using table1, excel 2aster  append  dec(4)  label ctitle(PM Female) 





***********************************
******** The Socio-Economic Determinants
***********************************



********************
******** Table 2
********************

preserve

* Express income as income in ī
replace mean_income_imp=mean_income_imp/1000

* Express premature mortality as probability
replace pm0_70_m=pm0_70_m/100000

* Express premature mortality as probability
replace pm0_70_f=pm0_70_f/100000

* Descriptive summary stats of premature mortality
su pm0_70_m
su pm0_70_f

*** Male
reg pm0_70_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white,  
outreg2 using table2, excel noaster replace   dec(4)  label ctitle(PM Male)


*** Female
reg pm0_70_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health,  
outreg2 using table2, excel noaster append  dec(4)  label ctitle(PM Female)

restore




***********************************
******** Explaining the Spatial Patterns
***********************************



*** Male
quietly reg pm0_70_m mean_income_imp benefit_claimants_prop_1664 /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health /*
	 */ prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white [aweight=area_n_usual_residents], robust 
predict resi_reg1_m, resid
predict y_star0_70_m // used for the maps
predict resid0_70_m, resid // used for the maps


*** Female
quietly reg pm0_70_f mean_income_imp prop_L1_sec prop_L2_sec prop_L3_sec prop_L4_sec prop_L5_sec prop_L6_sec prop_L7_sec/*
	 */ prop_mixed prop_asian prop_black prop_white  /*
	 */ prop_q_L1 prop_q_L2  prop_q_L3 prop_q_L4 /* 
	 */ benefit_claimants_prop_1664 /*	
	 */prop_ind_agri prop_ind_mining prop_ind_manufacture prop_ind_elect_gas prop_ind_water prop_ind_construction /*
	 */prop_ind_retail prop_ind_transport prop_ind_hotel_food prop_ind_information prop_ind_financial prop_ind_real_estate /*
	 */prop_ind_profess_scientific prop_ind_admin prop_ind_public_admin prop_ind_education prop_ind_health [aweight=area_n_usual_residents], robust 
predict resi_reg1_f, resid
predict y_star0_70_f // used for the maps
predict resid0_70_f, resid // used for the maps



********************
******** table 4
********************

capture dropvars westerness
gen westerness=-easterness


** Great Britain
* Male 
reg pm0_70_m    northerness westerness [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  replace  dec(4)  label ctitle(PM Male) 

* Female 
reg pm0_70_f    northerness westerness [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Male 
reg resi_reg1_m    northerness westerness [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Male) 

* Female 
reg resi_reg1_f    northerness westerness [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 







** Great Britain
* Male 
reg pm0_70_m    centrality [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f    centrality [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    centrality [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    centrality [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 




** Great Britain
* Male 
reg pm0_70_m     pm070_m_splag_cont_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f     pm070_f_splag_cont_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm070_m_splag_cont_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    pm070_f_splag_cont_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain
* Male 
reg pm0_70_m     pm070_m_splag_prox_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f     pm070_f_splag_prox_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    pm070_m_splag_prox_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    pm070_f_splag_prox_rwst [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 





** Great Britain
* Male 
reg pm0_70_m    area_density  [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg pm0_70_f    area_density [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 


* Male 
reg resi_reg1_m    area_density [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 

* Female 
reg resi_reg1_f    area_density [aweight=area_n_usual_residents], robust
outreg2 using table4, excel 2aster  append  dec(4)  label ctitle(PM Female) 



